Repository navigation
fix(scenarios): travel_expense build provenance names the current card; run --template warns on a stale cardSha256 - #37339
Conversation
…un --template warns on a stale one The verified build's provenance named card sha256 29162eef..., the card before #36320 and #36617; the card file on main hashes to 212abedb... (sha256 of the file's bytes, as the loader stamps it). Since the build was authored only the card's prompt and run sections changed; expect and iterate did not, so the build file and its verified scores stand. run --template F now prints a warning when F.provenance.json names the same card with another cardSha256, and a test pins each committed provenance to its card and build file. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
…the fixtures The committed-fixture pin read docs/qa/scenarios/builds/, a radius the package does not declare; it is dropped from this change. The warning's own cases stay, plus one that reads the provenance from disk. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
📓 Docs Drift Check2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin cebd4eb2e8dbbe2de8d032dcd5466857ab39c5a0 && git checkout cebd4eb2e8dbbe2de8d032dcd5466857ab39c5a0
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin c2f8bff93f6484c43b7667955a0a3541c1454440 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753 && git checkout -B drift-repro c2f8bff93f6484c43b7667955a0a3541c1454440 && git merge --no-ff 0d4f42ec4956fc1ad9e92b29b6979e7051e8d753
node scripts/docs-audit/affected-docs.mjs --json c2f8bff93f6484c43b7667955a0a3541c1454440 |
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr Landing · head
State: L1 ACCEPT on this head (7171970057); every check-run green or expected skip. Ready and auto-merge in this stroke. On MERGED, #36491 closes by |
Fixes #36491
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
docs/qa/scenarios/builds/travel_expense.provenance.json:cardSha25629162eef…->212abedb6b59a5ac0c6921c25bdcc4dc057cbc25e866a9cd2ed962920368a00d, the sha256 of the raw bytes ofdocs/qa/scenarios/travel_expense.jsonondbc1765a24. That is the hash the loader computes (loader.tsfileSha256,createHash('sha256').update(bytes)) and every run record stamps (CardStamp); there is no canonical form. The issue body namesa8a67be3…; the card moved again since (feat(scenarios): a card names the agent action an operation goes through (via) #36503 to68eb89a9…, fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) #36617 to212abedb…).packages/qa/scenarios/src/runner/cli.ts:templateProvenanceWarning(path, card)readsF.provenance.jsonbeside the--template Ffile; when it names the same card with anothercardSha256(or none, or is not JSON),runprints awarning: template provenance:line before the card runs. It never refuses; a missing provenance or one for another card says nothing. It lives in the CLI entry, not the./runnerexport, so the published import surface is unchanged.packages/qa/scenarios/README.md: one sentence under "Template and ask modes".@objectstack/scenariospatch.Acceptance notes
9d0c7dad…(the card when docs(scenarios): commit the dataset cards' verified builds as ask-round fixtures #35222 committed it). Practice since fix(scenarios): travel_expense figure questions write one measure's own word #35764 and feat(scenarios): dataset-card questions name their ask kind, and a round counts every kind #36065 has been to refreshcardSha256on a card edit with the build untouched, so the field reads as "the card this fixture is current against", while fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) #36617's body reads it as "the card at build time". This PR follows the practice. Measured to back it: between9d0c7dad…and212abedb…only the card'spromptandrunkeys differ;expectanditerateare byte-identical (top-levelJSON.stringifycompare). A scratchscoreGraph(artifactToEvalGraph(build), expect)re-score gives 61/61 on both the29162eef…card and the current one. So theverifiedscores still hold for the current card, butbuilt/authordescribe a run made against an older prompt (the step-two routing prose from reading first: travel_expense manager_approves_step_one resolves the step-2 approver to e14 where the card expects e13, in two fresh builds — card wrong, or approval-chain (manager lookup) resolution wrong? #35098 and the record-triggered flow prose from fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh (dataset coverage, over-gating, delete floor, card wording) #36617 are not in it). The provenance still does not record that, and this PR does not add a field for it.builds/holds one provenance, so there are no others to refresh.docs/qa/scenarios/builds/and holds eachcardSha256equal to its card. That turns the next stale card edit into a red CI run, not only a run-time warning.check:cross-package-test-inputsrefused it because the radius is undeclared, and declaring it means editingscripts/cross-package-test-inputs.mjsand the rootturbo.json, both outside this card's file surface. I left it out.docs/qa/scenarios/builds/travel_expense.json(protocol ^18 -> ^19) without touching the provenance. Once it lands, the provenance'ssha256(4ab7e603…) no longer matches the build file, and noamendedentry records the change. That PR does not overlap these files.Verification
First read (by risk):
packages/qa/scenarios/src/runner/cli.ts,templateProvenanceWarning: when it stays silent and when it warns.docs/qa/scenarios/builds/travel_expense.provenance.json: the one-line hash change.Two-minute check:
sha256sum docs/qa/scenarios/travel_expense.jsonprints212abedb6b59a5ac…, the same value the provenance now holds.Tests and gates (head 0d4f42e)
os-verify-lock.sh -c "pnpm --filter @objectstack/scenarios build && … typecheck && … test"onaf13a9a6a5(the test/src tree of the final head): VERDICT command-exit 0; Test Files 43 passed (43), Tests 1342 passed (1342).git checkout HEAD --,git diff HEADempty, blob hash matched):scripts/ablation-replace.mjsreplacedif (provenance.cardSha256 === card.sha256) return undefined;withreturn undefined;(anchor 1 -> 0).test/runner/template-provenance.test.tsthen went 2 failed / 4 passed, the two warning cases red.node scripts/pm/dispatch-gates.mjs --commandsonaf13a9a6a5: 65 commands, all run;--ranreconciliation: 65 derived, 65 run, 0 UNRUN. Non-zero:check:dual-build-cjs-loadsexit 3 PREREQUISITE NOT MET (needs a whole-workspace build, so NOT MEASURED locally; CI runs it).check:dts-closureexit 1 in the batch becauseplugin-auditdist was half-built in this shared tree; afterpnpm --filter @objectstack/plugin-audit buildit exits 0. On0d4f42ec49(changeset declaration lines only) the changeset family ran again:check-changeset-no-major,check-empty-changeset,check-adr-0087-registration,check:changeset-gate-self-testsandcheck:nul-bytesall exit 0.scripts/pm/overlap-check.mjs: VERDICT clean exit 0. feat(spec)!: PROTOCOL_VERSION 18 → 19, and every current-protocol handshake reads '^19' #37314's file list does not intersect this diff.🤖 Generated with Claude Code
https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr